<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>背景图</title>
    <style>
        .demo{
            width: 100px;
            height: 100px;
            border: 1px solid black;
            background: url('img/location_bg.jpg') -100px -145px;
            margin: 100px auto 0;
        }
        .demo2{
            width: 200px;
            height: 200px;
            border: 10px solid #000;
            margin: 20px;
            padding: 20px;
            background-color: gold;
        }
        .demo3{
            width: 400px;
            height: 54px;
            border-top: 1px solid #f00;
            border-bottom: 3px solid #666;
        }
        .demo3 p{
            font-size: 20px;
            font-family: '微软雅黑';
            color: #333;
            margin-top:15px;
        }
    </style>
</head>
<body>
    <div class="demo"></div>
    <div class="demo2">外边距合并指的是,当两个垂直外边距相遇时,它们将形成一个
        外边距。</div>
    <div class="demo3"><p>新闻列表</p></div>
</body>
</html>